<?php

/**
 * nahoWikiRevision form base class.
 *
 * @package    ##PROJECT_NAME##
 * @subpackage form
 * @author     ##AUTHOR_NAME##
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 15484 2009-02-13 13:13:51Z fabien $
 */
class BasenahoWikiRevisionForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'created_at' => new sfWidgetFormDateTime(),
      'page_id'    => new sfWidgetFormInputHidden(),
      'revision'   => new sfWidgetFormInputHidden(),
      'user_name'  => new sfWidgetFormInput(),
      'comment'    => new sfWidgetFormInput(),
      'content_id' => new sfWidgetFormInputHidden(),
      'id_groupe'  => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'created_at' => new sfValidatorDateTime(array('required' => false)),
      'page_id'    => new sfValidatorPropelChoice(array('model' => 'nahoWikiPage', 'column' => 'id', 'required' => false)),
      'revision'   => new sfValidatorPropelChoice(array('model' => 'nahoWikiRevision', 'column' => 'revision', 'required' => false)),
      'user_name'  => new sfValidatorString(array('max_length' => 255)),
      'comment'    => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'content_id' => new sfValidatorPropelChoice(array('model' => 'nahoWikiContent', 'column' => 'id', 'required' => false)),
      'id_groupe'  => new sfValidatorInteger(),
    ));

    $this->widgetSchema->setNameFormat('naho_wiki_revision[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'nahoWikiRevision';
  }


}
